<template>
  <div style="min-height:135px;height:100%;background-color: white;border-radius:10px">
    <!-- <el-row style="height:83%"> -->
    <!-- <el-row style="height:40%"> -->
    <!-- <div class="dataCenter"> -->
    <div class="projectIndexTitle">
      <div class="projectIndexSquare"></div>
      <label class="projectIndexInfo">数据中心</label>
    </div>
    <!-- <el-col :span="2">
              <div style="background-color:green;height:2vh;width:10px;border-radius:5px;"></div>
            </el-col>
            <el-col :span="20">数据中心</el-col>
            <el-col :span="2"> -->
    <!-- <component-Setting :id="recordId" :position="'1'"></component-Setting> -->
    <!-- </el-col> -->
    <div style="height:75%;display:flex;align-items:center">
      <el-row style="margin-top:3%;width:100%">
        <el-row class="dataCenterRow">
          <el-col :span="6" align="left" style="font-size:14px">项目总数量</el-col>
          <el-col :span="14" align="right" style="font-size:14px;"
            ><b class="numberSpan">{{ res.count }}</b
            >&nbsp;个</el-col
          >
        </el-row>
        <el-row class="dataCenterRow">
          <el-col :span="6" align="left" style="font-size:14px">项目总金额</el-col>
          <el-col :span="14" align="right" style="font-size:14px;"
            ><b class="numberSpan">{{ res.money | moneyFormate }}</b
            >&nbsp;万元</el-col
          >
        </el-row>
      </el-row>
    </div>
    <!-- </div> -->
    <!-- </el-row> -->
    <!-- </el-row> -->
  </div>
</template>

<script>
import store from '@tapui/store'
import { getAction } from '@tapui/utils/http'
import componentSetting from './componentSetting'
import { formateTec } from '@/utils/global'
export default {
  name: 'dataCenter',
  components: { componentSetting },
  data() {
    return {
      res: {}
    }
  },
  methods: {
    queryData(queryParam) {
      // 调用后台接口查询数据,默认条件是查询公司所有数据
      getAction('mpm/mpmIndex/getDataCenterInfo', queryParam).then((res) => {
        if (res.success) {
          this.res = res.result
        } else {
          this.$tap.alert(res.message, 'warning')
        }
      })
    }
  },
  created() {},
  mounted() {
    this.queryData()
  },
  props: {
    recordId: Number
  },
  beforeDestroy() {},
  filters: {
    moneyFormate: (value) => {
      return formateTec(value)
    }
  }
}
</script>

<style lang="scss" scoped>
.dataTitleForTop10 {
  margin-top: 2vh;
  // color: #8fafc0;
  height: 18px;
}
/* .dataChunkBigTile {
  bottom: 5px;
  color: black;
  font-size: 2.5vh;
} */
.top10Label {
  font-size: 1.5vh;
  margin-bottom: 15px;
  text-align: center;
}
.dataChunkTile {
  // font-size: 16px;
  font-size: 1.5vh;
  margin-bottom: 15px;
}
.dataChunkValue {
  font-size: 2vh;
  color: #0a966e;
}
.dataCenterRow {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 20px;
  /* margin-top: 4vh;
  height: 4vh; */
  // color: #8fafc0;
}
.app-main {
  height: 100%;
  width: 100%;
  /* background-image: url('/static/images/paojectManager/dataBigSereen.jpg'); */
}
.topCol {
  height: 100%;
  color: #8fafc0;
  text-align: center;
  padding-top: 1.5%;
}
.topRow {
  height: 10%;
}
.dataCenter {
  height: 100%;
  // background-image: url('/static/images/paojectManager/dataCenter.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 20px;
}
.projectState {
  height: 100%;
  // background-image: url('/static/images/paojectManager/projectState.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.top10 {
  height: 100%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 10px;
}
.oneYearData {
  height: 100%;
  // background-image: url('/static/images/paojectManager/oneYearData.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 20px;
}
.el-scrollbar__view {
  height: 98%;
  width: 100%;
  /* background-image: url('/static/images/paojectManager/dataBigSereen.jpg'); */
}
#echartsContainer {
  width: 100%;
  height: 100%;
  margin-bottom: 8px;
  /* border: 1px solid #ddd; */
}
.row {
  margin-top: 10px;
}
.dataRowForTop10 {
  margin-top: 1.5vh;
}
.top10Content {
  font-size: 1.5vh;
  color: #8fafc0;
  text-align: left;
}
.top10Title {
  font-size: 2.5vh;
  color: black;
}
.timeFlagGroup {
  margin-top: vh;
}
.buttonBgColor {
  background-color: #042e50;
}
/* @media screen and (max-width: 1920px) {
  .dataRow {
    margin-top: 10px;
    // color: #8fafc0;
  }
  .dataRowForTop10 {
    margin-top: 20px;
    // color: #8fafc0;
  }
} */
.numberSpan {
  font-size: 20px;
  color: #01365a;
}
</style>
